<template>
    <select name="dropdown" id="dropdown" v-model="selectedOption" v-on:change="optionChanged">

        <option value="null" disabled>Select an option</option>
        <option value="Value 1">Value 1</option>
        <option value="Value 2">Value 2</option>
        <option value="Value 3">Value 3</option>
    </select>
</template>

<script>
    export default {
        mounted() {
            console.log('DropdownComponent mounted.')
        },

        data: () => ({
        selectedOption: null,
        }),

        methods: {
            optionChanged(value) {
                this.$emit('update:option', this.selectedOption);
            }
        },
        
        computed: {
            tax() {
                return this.price * this.taxScale;
            },
        }

    }
</script>
